package com.wgy.designmode.structure.facade.facade;

import com.wgy.designmode.structure.facade.component.Component;

public class Computer {

    private Component cpu;

    private Component ddr;

    private Component ssd;

    public Computer(Component cpu, Component ddr, Component ssd) {
        this.cpu = cpu;
        this.ddr = ddr;
        this.ssd = ssd;
    }


    public void start(){
        cpu.open();

        ddr.open();

        ssd.open();
    }

    public void shutdown(){
        ssd.close();

        ddr.close();

        cpu.close();
    }
}
